Any position independent code is best written using which of
Any position independent code is best written using which of the following addressing modes ?
Any position independent code is best written using which of the following addressing modes ?
Akilesh Kharvi ? Dec 8 '2016 at 21:52
Answer:Relative.
Explanation:
The relative addressing mode permits the writing of "position-independent code," programs which will be properly executed by the processor regardless of where they are located in memory.
The entire program (together with any necessary data) may be picked up from one region of memory and moved to another with no adverse effect. In order to be location-independent a program may not refer to any specific location by address. All references to memory must be through the use of relative addressing.
All compilers are designed to be
Akilesh Kharvi ? Dec 8 '2016 at 21:48
Answer: re-entrant
Explanation:
Compilers and other programs were often written to be reentrant, so a single copy of the tool lived in memory, yet was shared by perhaps a hundred users. Each person had his or her own data area, yet everyone running the compiler quite literally executed identical code. As the operating system changed contexts from user to user it swapped data areas so one person's work didn't effect any other. Share the code, but not the data.
In the embedded world a routine must satisfy the following conditions to be reentrant:
->It uses all shared variables in an atomic way, unless each is allocated to a specific instance of the function.
->It does not call non-reentrant functions.
->It does not use the hardware in a non-atomic way.
Recursive descent parsing is an example of
Akilesh Kharvi ? Dec 8 '2016 at 21:45
Answer : top down parsing
Explanation:
One of the most straightforward forms of parsing is recursive descent parsing. This is a top-down process in which the parser attempts to verify that the syntax of the input stream is correct as it is read from left to right.
Compiler Design, Computer Organization Architecture, PGCET CSE Exam (Karnataka) 2011, Solved, Technical Aptitude
How many 32 x 1 RAM chips are needed to provide a memory capacity of 256 kilo bytes ?
Akilesh Kharvi ? Dec 8 '2016 at 20:14
Answer : 64
Explanation:
We need 256 Kbytes, i.e., 256 x 1024 x 8 bits.
We have RAM chips of capacity 32 Kbits = 32 x 1024 bits.
=>256×1024×832×1024=64
In a syntax directed translation scheme, the value of an attribute of a node is a function of the attributes of its children. Such an attribute is called a / an
Akilesh Kharvi ? Dec 8 '2016 at 20:7
Answer: synthesised attribute
Explanation:
A synthesized attribute for a nonterminal A at a parse-tree node N is defined by a semantic rule associated with the production at N. Note that the production must have A as its head.
A synthesized attribute at node N is defined only in terms of attribute values at
the children of N and at N itself.